|
|
|
|
|
|
|
related to the primary key of the table. This particularly includes derived data or other calculations. |
|
|
|
|
|
|
|
|
· Rule 4: Isolate Independent Multiple Relationships. Use this rule to improve database design when you are dealing with more than one one-to-many relationship in the database. Before you add a new field to a table, ask yourself whether this field is really dependent upon the other fields in the table. If not, create a new table with the independent data. |
|
|
|
|
|
|
|
|
· Rule 5: Isolate Related Multiple Relationships. Use this rule to improve database design when you are dealing with more than one many-to-many relationship in the database. If you have database rules that require multiple references to the same field or sets of fields, isolate the fields into smaller tables and construct one or more link tables that contain the required constraints that enforce database integrity. |
|
|
|
|
|
|
|
|
1. Is it a good idea to optimize your database strictly for speed? |
|
|
|
|
|
|
|
|
2. What is meant by the term First Normal Form? |
|
|
|
|
|
|
|
|
3. Explain how the second rule of data normalization differs from the first rule of normalization. |
|
|
|
|
|
|
|
|
4. Should you include fields in a data table that are the calculated results of other fields in the same table? |
|
|
|
|
|
|
|
|
5. When would you invoke the fourth rule of data normalization? |
|
|
|
|
|
|
|
|
6. When would you invoke the fifth rule of data normalization? |
|
|
|
|
|
|
|
|
1. As a computer consultant, you have landed a contract to build a customer tracking system for your local garage. After several days of interviews with the owner, mechanics, and staff members, you have determined that the following data fields should be included in your database. Many of the customers of this garage have more than one automobile. Therefore, you are requested to leave room for tracking two cars per customer. |
|
|
|
|
|
|
|
|
Use these fields: CustomerID, CustomerName, Address, City, State, Zip, Phone, SerialNumber, License, VehicleType1, Make1, Model1, Color1, Odometer1, VehicleType2, Make2, Model2, Color2, Odometer2. |
|
|
|
|
|
|
|
|
Optimize this data into tables using the rules of data normalization discussed in today's lesson. Identify all primary and foreign keys. |
|
|
|
|
|
|
|
|
2. Write the SQL statements that create the tables you designed in Exercise 1. |
|
|
|
|
|